import request from '@/utils/request'

// 查询出库记录列表
export function listOutboundRecord(query) {
  return request({
    url: '/wms/outbound/record/list',
    method: 'get',
    params: query
  })
}

// 查询出库记录详细
export function getOutboundRecord(recordId) {
  return request({
    url: '/wms/outbound/record/' + recordId,
    method: 'get'
  })
}

// 新增出库记录
export function addOutboundRecord(data) {
  return request({
    url: '/wms/outbound/record',
    method: 'post',
    data: data
  })
}

// 修改出库记录
export function updateOutboundRecord(data) {
  return request({
    url: '/wms/outbound/record',
    method: 'put',
    data: data
  })
}

// 删除出库记录
export function delOutboundRecord(recordId) {
  return request({
    url: '/wms/outbound/record/' + recordId,
    method: 'delete'
  })
}

// 根据出库单ID查询出库记录
export function getOutboundRecordByOrderId(orderId) {
  return request({
    url: '/wms/outbound/record/order/' + orderId,
    method: 'get'
  })
}